package koction.model.rankService;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;


import koction.model.rank.RankDAO;
import koction.model.rank.RankVO;

@Service
public class RankServiceImpl implements RankService 
{
	@Resource(name="rankDAOImpl")
	private RankDAO rankDAO;
	public List<RankVO> getAllKeywordList() throws Exception 
	{
		return rankDAO.getAllKeywordList();
	}

	public void insertKeyword(String keyword) throws Exception 
	{
		String key = rankDAO.checkKeyword(keyword);
		if(key!=null)
		{
			rankDAO.updateKeyword(keyword);
		}
		else
		{
			rankDAO.insertKeyword(keyword);
		}
	}
}
